package com.lancoo.znbkxx.net;

import android.util.Log;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import io.reactivex.observers.DisposableObserver;
import okhttp3.ResponseBody;

/**
 * Create by TangJun on 2019/2/16
 */
public class FirstPageApi {

    //?SchoolID=S22-sa-2963&SubjectID=C&GlobalGrade=K9&CourseClassID=0A99D23C-A0F4-436F-9A8D-D6ECD382189E&StuID=sastu255&SearchField=&
    // Layer=0&State=-1&DateField=0&ScoreField=0&PageNumber=1&PageSize=1")
    public static void getFirstPageInfo(String key,String schoolID, String subjectID,String globalGrade,  String courseClassID, String stuID,
                                        String layer, String searchField, String state, String dateField,
                                        String scoreField, String pageNumber, String pageSize, DisposableObserver<ResponseBody> subscriber) {
        Map<String,String> map = new HashMap<>();
        map.put("Key",key);
        map.put("SchoolID",schoolID);
        map.put("SubjectID",subjectID);
        map.put("GlobalGrade",globalGrade);
        map.put("CourseClassID",courseClassID);
        map.put("StuID",stuID);
        map.put("Layer",layer);
        map.put("SearchField",searchField);
        map.put("State",state);
        map.put("DateField",dateField);
        map.put("ScoreField",scoreField);
        map.put("PageNumber",pageNumber);
        map.put("PageSize",pageSize);
        //Bean bean = new Bean();
        //bean.getData().setMemberId(memberId);
        Log.e("==getFirstPageInfo==","=========bkfx--list--传参==================="+map.toString());
        Observable observable = HttpMethods.getInstance().getHttpApi().getFirstPageInfo(map); //在HttpServer中
        HttpMethods.getInstance().toSubscribe(observable, subscriber);
    }
}
